﻿@model IEnumerable<DavidCms.Web.Models.ArticlePO>

@{
    ViewBag.Title = "文章列表";
    Layout = "~/Views/Shared/CmsBgLayout.cshtml";
}

<h2>文章列表</h2>

<p>
    @Html.ActionLink("添加文章", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.NavigationName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.publishTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Editer)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CreateTime)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.NavigationName)
        </td>
        <td>
            @Html.ActionLink(item.Title, "Details", new { id = item.Id })
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.publishTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Editer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreateTime)
        </td>
        <td>
            @Html.ActionLink("编辑", "Edit", new { id=item.Id }) |
            @Html.ActionLink("删除", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
